// $Id: eos.h 68 2004-11-12 10:44:03Z jonas $
#ifndef EOS_H
#define EOS_H

#include <list>

class Node;
class Network;
class FileHandler;
class Partitionizer;
class Distributions;

/**
 * Eos is the simulator. Eos knows it all. It is Eos that sets everything up,
 * owns alot, and acctually simulates.
 */
class Eos {
public:
	Eos(const char*, unsigned int, unsigned int, unsigned int, int, unsigned int, unsigned int, unsigned int, unsigned int, float, float);
	~Eos();

	void init();
	void simulate();

	/*Network *getNetwork();
	void setNetwork(Network *);*/

	std::list<Node *> *getNodes() { return &m_nodes; }

	// Lotsa gettys
	const char *getScenario() { return m_scenario; }
	unsigned int getRandomSeed() { return m_randomSeed; }
	unsigned int getIterationCount() { return m_iterationCount; }
	unsigned int getNodeCount() { return m_nodeCount; }
	int getFileCount() { return m_fileCount; }
	unsigned int getNodeFileStoreLimit() { return m_nodeFileStoreLimit; }
	unsigned int getNodeRoutingTableLimit() { return m_nodeRoutingTableLimit; }
	unsigned int getRequestHopsToLive() { return m_requestHopsToLive; }
	unsigned int getInsertHopsToLive() { return m_insertHopsToLive; }
	float getRequestProbability() { return m_requestProbability; }
	float getInsertProbability() { return m_insertProbability; }

private:
	FileHandler *registerFileHandler(FileHandler *);
	void setSettings(unsigned int, unsigned int, int, unsigned int, unsigned int, unsigned int, unsigned int, float, float);
	Distributions *m_distributions;

	const char *m_scenario;
	unsigned int m_randomSeed;
	unsigned int m_iterationCount;
	unsigned int m_nodeCount;
	int m_fileCount;
	unsigned int m_nodeFileStoreLimit;
	unsigned int m_nodeRoutingTableLimit;
	unsigned int m_requestHopsToLive;
	unsigned int m_insertHopsToLive;
	float m_requestProbability;
	float m_insertProbability;

	std::list<Node *> m_nodes;
	Network *m_network;
	Partitionizer *m_partitionizer;
	std::list<FileHandler *> m_fileHandlers;
};

#endif
